package com.itlzh.mall.common.enums;

import lombok.Getter;

@Getter
public enum ResponseEnum {
    //成功状态码
    SUCCESS(2000,"成功"),
    //失败状态码
    FAIL(1000,"操作失败"),
    /**
     * 参数错误：1001-1999
     */
    PARAM_IS_INVALID(1001,"参数无效"),
    PARAM_IS_VALID(1002,"参数检验无效"),
    PARAM_TYPE_BIND_ERROR(1003,"参数格式错误"),
    /**
     * 用户错误：2001-2999
     */
    USER_NOT_LOGGED_IN(2001,"用户未登录,请先登录"),
    USER_ACCOUNT_FORBIDDEN(2002,"常昊不存在或账号已禁用"),
    USER_PASSWORD_ERROR(2003,"密码错误"),
    USER_HAS_EXISTED(2004,"用户已存在"),
    /**
     * 权限错误 3001-3999
     */
    PERMISSION_UNAUTHRIZED(3001,"权限不足，无法操作"),
    PERMISSION_EXPIRE(3002,"登陆状态已过期"),
    PERMISSION_TOKEN_EXPERED(3003,"登陆状态已过期");
    private int code;
    private String message;
    private ResponseEnum(int code, String message){
        this.code = code;
        this.message = message;
    }
}
